Accessing functions in a swf-file through javascript [chatroulette.com]
Posted
by RadiantHeart
on Stack Overflow
See other posts from Stack Overflow
or by RadiantHeart
Published on 2010-04-28T16:49:12Z
Indexed on
2010/04/28
16:53 UTC
Read the original article
Hit count: 313
Lately I have been interested in the code behind chatroulette.com. As you probably know it is a peer-to-peer webcam-chat-service written in actionscript, as I understand. What i have been wondering about is weather its possible to extract the ip-address of whomever you are currently communicating with. I have seen services that do that, but they require that you install a program that runs alongside on your computer sniffing UDP-packages. I was wondering if there was a simpler method.
What I do know is that the javascript on the page communicates with the application via "ExternalInterface". On this area I am pretty much a novice but according to my limited understanding you cant get information from the flash-application unless you have configured a listener for a call from javascript and then attach a callback to that event. Is this correct or can you access public functions and variables directly through javascript?
There is for example a public function like this:
public function get outgoingAddress():String{
return (this.__info.outgoingAddress);
}
Can it be accessed directly through javascript?
If it cant be done so easily, is it possible to decompile the .swf-file, change it (add some functions) and recompile it and run it instead? I am hoping someone can satisfy my curiosity here.
Here are two links to a decompiled version of the swf-file. The first with line numbering and one without.
With line numbering ˜ 3.5 Mbyte
Without line numbering ˜ 2.1 Mbyte
© Stack Overflow or respective owner